<template>
    <fieldset>
        <legend>计算属性</legend>
        <h1>num:{{ num }}</h1>
        <h1>newNum:{{ newNum }}</h1>
        <button @click='num++'>点击修改num</button>
    </fieldset>
</template>
<script setup>
import { ref, computed } from "vue"

let num = ref(10)

//计算属性

let newNum = z
let newNum2 = computed(() => {
    return num.value + '10'
})

console.log(newNum)

console.log(newNum2.value.length)
</script>